//
//  JYJFeaturedDetailsTableHeadView.m
//  HappyListen
//
//  Created by 冀永金 on 16/8/31.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "JYJFeaturedDetailsTableHeadView.h"
#import "BaseLabel.h"
#import "BaseButton.h"
#import "Masonry.h"
#import "JYJTAMacro.h"
#import "JYJBannerListModel.h"
#import "JYJNetWorkParser.h"
#import "UIImageView+WebCache.h"
#import "JYJBestItemsModel.h"
#import "JYJEventListModel.h"
#import "JYJAnchorColumnModel.h"
#import "JYJColumnListModel.h"
#import "JYJVCOfFeaturedTopThreeDetails.h"
#import "JYJVCOfIntroduction.h"
#import "JYJTwoSegmentModel.h"
#import "JYJTwoSegmentModelTwo.h"
#import "JYJProgramListModel.h"
#import "JYJProgramListSecondModel.h"
#import "JYJMusicsContentModel.h"
#import "JYJSeachModelOne.h"
#import "JYJSeachModelTwo.h"
#import "JYJSeachProgramModelOne.h"
#import "JYJSeachProgramModelTwo.h"
#import "JYJVCOfAnchorInfoViewController.h"
@interface JYJFeaturedDetailsTableHeadView ()
@property (nonatomic, strong) UIImageView *backSmallImage;
@property (nonatomic, strong) UIImageView *smallHeadImage;
@property (nonatomic, strong) UIImageView *musicImg;
@property (nonatomic, strong) BaseLabel *redLabel;
@property (nonatomic, strong) BaseLabel *labelOfDetails;
@property (nonatomic, strong) BaseButton *readButton;
@property (nonatomic, strong) UIView *redView;
@property (nonatomic, strong) UIView *grayView;
@property (nonatomic, strong) NSDictionary *infoDic;
@property (nonatomic, strong) NSDictionary *dic;
@end
@implementation JYJFeaturedDetailsTableHeadView
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self configSubViews];
    }
    return self;
}
- (void)configSubViews {
    self.backSmallImage = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"pro_img_bg"]];
    [self addSubview:_backSmallImage];
    _backSmallImage.userInteractionEnabled = YES;
    self.musicImg = [[UIImageView alloc]init];
    [self addSubview:_musicImg];
    _musicImg.userInteractionEnabled = YES;
    self.smallHeadImage = [[UIImageView alloc]init];
    [self addSubview:_smallHeadImage];
    _smallHeadImage.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handleNext)];
    [self.musicImg addGestureRecognizer:tap];
     UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(handle)];
    [self.smallHeadImage addGestureRecognizer:tap1];
    self.redLabel = [[BaseLabel alloc]init];
    [self addSubview:_redLabel];
    self.redLabel.textColor = [UIColor colorWithRed:0.80 green:0.15 blue:0.09 alpha:1.00];
    self.labelOfDetails = [[BaseLabel alloc]init];
    [self addSubview:_labelOfDetails];
    self.labelOfDetails.textColor = [UIColor whiteColor];
    self.redView = [[UIView alloc]init];
    [self addSubview:_redView];
    _redView.backgroundColor = [UIColor colorWithRed:0.87 green:0.24 blue:0.18 alpha:1.00];
    self.grayView = [[UIView alloc]init];
    [self addSubview:_grayView];
    _grayView.backgroundColor = [UIColor lightGrayColor];
    self.readButton = [BaseButton buttonWithType:UIButtonTypeCustom];
    [self addSubview:_readButton];
    [self.readButton addTarget:self action:@selector(handleRead:) forControlEvents:UIControlEventTouchUpInside];
    [self.readButton setImage:[UIImage imageNamed:@"album_ding1"] forState:UIControlStateNormal];
}
- (void)setCycleImageModel:(JYJBannerListModel *)cycleImageModel {
    _cycleImageModel = cycleImageModel;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *str2 = [NSString stringWithFormat:@"%@",self.cycleImageModel.item_id];
    NSString *string = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:str2] stringByAppendingString:string];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle:JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
    } andFailureBlock:^(NSError *error) {
        
    }];
    
}
- (void)setItemsModel:(JYJBestItemsModel *)itemsModel {
    _itemsModel = itemsModel;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *str2 = [NSString stringWithFormat:@"%@",self.itemsModel.item_id];
    NSString *string = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:str2] stringByAppendingString:string];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle:JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
    } andFailureBlock:^(NSError *error) {
        
    }];

}
- (void)setEventModel:(JYJEventListModel *)eventModel {
    _eventModel = eventModel;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *str2 = [NSString stringWithFormat:@"%@",self.eventModel.item_id];
    NSString *string = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:str2] stringByAppendingString:string];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle:JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
    } andFailureBlock:^(NSError *error) {
        
    }];
    

}
-(void)setColumnModel:(JYJAnchorColumnModel *)columnModel {
    _columnModel = columnModel;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *string = [NSString stringWithFormat:@"%ld",self.columnModel.item_id];
    NSString *str3 = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:string]stringByAppendingString:str3];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle: JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];

    } andFailureBlock:^(NSError *error) {
        
    }];
    
}
-(void)setColumnListModel:(JYJColumnListModel *)columnListModel {
    _columnListModel= columnListModel;
     NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *string = [NSString stringWithFormat:@"%ld",self.columnListModel.item_id];
    NSString *str3 = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:string]stringByAppendingString:str3];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle: JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
        
    } andFailureBlock:^(NSError *error) {
        
    }];

}
-(void)setSegmentModel:(JYJTwoSegmentModel *)segmentModel {
    _segmentModel = segmentModel;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *string = [NSString stringWithFormat:@"%ld",self.segmentModel.item_id];
    NSString *str3 = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:string]stringByAppendingString:str3];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle: JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
        
    } andFailureBlock:^(NSError *error) {
        
    }];

}
- (void)setSegmentModelTwo:(JYJTwoSegmentModelTwo *)segmentModelTwo {
    _segmentModelTwo = segmentModelTwo;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *string = [NSString stringWithFormat:@"%ld",self.segmentModelTwo.item_id];
    NSString *str3 = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:string]stringByAppendingString:str3];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle: JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
        
    } andFailureBlock:^(NSError *error) {
        
    }];
    

}
-(void)setProgramListModel:(JYJProgramListModel *)programListModel {
    _programListModel = programListModel;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *string = [NSString stringWithFormat:@"%ld",self.programListModel.item_id];
    NSString *str3 = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:string]stringByAppendingString:str3];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle: JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
        
    } andFailureBlock:^(NSError *error) {
        
    }];
    

}
-(void)setProgramListModelTwo:(JYJProgramListSecondModel *)programListModelTwo {
    _programListModelTwo = programListModelTwo;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *string = [NSString stringWithFormat:@"%ld",self.programListModelTwo.item_id];
    NSString *str3 = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:string]stringByAppendingString:str3];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle: JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
        
    } andFailureBlock:^(NSError *error) {
        
    }];
    

}
- (void)setMusicsContentModel:(JYJMusicsContentModel *)musicsContentModel {
    _musicsContentModel = musicsContentModel;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *string = [NSString stringWithFormat:@"%ld",self.musicsContentModel.item_id];
    NSString *str3 = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:string]stringByAppendingString:str3];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle: JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
        
    } andFailureBlock:^(NSError *error) {
        
    }];
    

}
- (void)setSeachModelOne:(JYJSeachModelOne *)seachModelOne {
    _seachModelOne = seachModelOne;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *string = [NSString stringWithFormat:@"%ld",self.seachModelOne.item_id];
    NSString *str3 = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:string]stringByAppendingString:str3];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle: JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
        
    } andFailureBlock:^(NSError *error) {
        
    }];

}
- (void)setSeachModelTwo:(JYJSeachModelTwo *)seachModelTwo {
    _seachModelTwo = seachModelTwo;
    
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *string = [NSString stringWithFormat:@"%ld",self.seachModelTwo.item_id];
    NSString *str3 = @"%22%2C%22session%22%3A%7B%22uid%22%3A%22%22%2C%22sid%22%3A%22%22%7D%7D";
    string = [[str1 stringByAppendingString:string]stringByAppendingString:str3];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle: JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
        
    } andFailureBlock:^(NSError *error) {
        
    }];

}
- (void)setSeachProgramModelOne:(JYJSeachProgramModelOne *)seachProgramModelOne {
    _seachProgramModelOne = seachProgramModelOne;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *string = [NSString stringWithFormat:@"%ld",self.seachProgramModelOne.item_id];
    NSString *str3 = @"%22%2C%22session%22%3A%7B%22uid%22%3A%2233366%22%2C%22sid%22%3A%2216c79d7928f744d894fe9ddf43865f0b%22%7D%7D";
    string = [[str1 stringByAppendingString:string]stringByAppendingString:str3];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle: JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
        
    } andFailureBlock:^(NSError *error) {
        
    }];

}
- (void)setSeachProgramModelTwo:(JYJSeachProgramModelTwo *)seachProgramModelTwo {
    _seachProgramModelTwo = seachProgramModelTwo;
    NSString *str1 = @"json=%7B%22item_id%22%3A%22";
    NSString *string = [NSString stringWithFormat:@"%ld",self.seachProgramModelTwo.item_id];
    NSString *str3 = @"%22%2C%22session%22%3A%7B%22uid%22%3A%22%22%2C%22sid%22%3A%22%22%7D%7D";
    string = [[str1 stringByAppendingString:string]stringByAppendingString:str3];
    [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/item.jhtml" andBody:string andBodyStyle: JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
        self.infoDic = [result objectForKey:@"data"];
        NSString *url = [result[@"data"] objectForKey:@"item_img"];
        [self.musicImg sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:PLACEHOLDERIMAGE];
        NSString *headUrl = [result[@"data"] objectForKey:@"item_managerimg"];
        [self.smallHeadImage sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:PLACEHOLDERIMAGE];
        self.redLabel.text = [result[@"data"] objectForKey:@"item_manager"];
        self.labelOfDetails.text = [result[@"data"] objectForKey:@"item_desc"];
        
    } andFailureBlock:^(NSError *error) {
        
    }];

}
- (void)layoutSubviews {
    [super layoutSubviews];
    [self.backSmallImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top).with.offset(10);
        make.left.equalTo(self.mas_left).with.offset(20);
        make.width.mas_equalTo(80);
        make.height.mas_equalTo(80);
    }];
    [self.musicImg mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top).with.offset(11);
        make.left.equalTo(self.mas_left).with.offset(21);
        make.width.mas_equalTo(66);
        make.height.mas_equalTo(78);
    }];
    [self.smallHeadImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top).with.offset(10);
        make.left.equalTo(self.backSmallImage.mas_right).with.offset(20);
        make.width.mas_equalTo(50);
        make.height.mas_equalTo(50);
    }];
    _smallHeadImage.layer.cornerRadius = self.smallHeadImage.frame.size.width / 2;
    _smallHeadImage.clipsToBounds = YES;
    [self.redLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.mas_top).with.offset(18);
        make.left.equalTo(self.smallHeadImage.mas_right).with.offset(10);
        make.width.mas_equalTo(150);
        make.height.mas_equalTo(20);
    }];
    [self.labelOfDetails mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.smallHeadImage.mas_bottom).with.offset(20);
         make.left.equalTo(self.backSmallImage.mas_right).with.offset(20);
        make.width.mas_equalTo(SCREEN_WIDTH - 100);
        make.height.mas_equalTo(30);
    }];
    [self.redView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.labelOfDetails.mas_bottom).with.offset(20);
        make.left.equalTo(self.mas_left).with.offset(0);
        make.width.mas_equalTo(SCREEN_WIDTH);
        make.height.mas_equalTo(2);
        
    }];
    [self.readButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.redView.mas_bottom).with.offset(15);
        make.left.equalTo(self.mas_left).with.offset(20);
        make.width.mas_equalTo(75);
        make.height.mas_equalTo(35);
    }];
    [self.grayView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.mas_bottom).with.offset(0);
        make.left.equalTo(self.mas_left).with.offset(0);
        make.width.mas_equalTo(SCREEN_WIDTH);
        make.height.mas_equalTo(2);

    }];
}
- (void)handleNext {
    JYJVCOfFeaturedTopThreeDetails *details  =(JYJVCOfFeaturedTopThreeDetails  *)self.nextResponder.nextResponder.nextResponder;
    JYJVCOfIntroduction *introduction = [[JYJVCOfIntroduction alloc]init];
    if (self.cycleImageModel) {
        introduction.intoductionDic = self.infoDic;
    }else if (self.itemsModel) {
        introduction.intoductionDic = self.infoDic;
    }else if (self.eventModel) {
        introduction.intoductionDic = self.infoDic;
    }else if (self.columnModel){
        introduction.intoductionDic = self.infoDic;
    }else if (self.columnListModel) {
        introduction.intoductionDic = self.infoDic;
    }else if (self.segmentModel) {
        introduction.intoductionDic = self.infoDic;
    }else if (self.segmentModelTwo){
        introduction.intoductionDic = self.infoDic;
    }else if (self.programListModel) {
        introduction.intoductionDic = self.infoDic;
    }else if (self.programListModelTwo) {
        introduction.intoductionDic = self.infoDic;
    }else if (self.musicsContentModel) {
        introduction.intoductionDic = self.infoDic;
    }else if (self.seachModelOne) {
        introduction.intoductionDic = self.infoDic;
    }else if (self.segmentModelTwo) {
        introduction.intoductionDic = self.infoDic;
    }else if (self.seachProgramModelOne) {
        introduction.intoductionDic = self.infoDic;
    }else {
        introduction.intoductionDic = self.infoDic;
    }
    details.tabBarController.tabBar.hidden = YES;
    details.hidesBottomBarWhenPushed = YES;
    [details.navigationController pushViewController:introduction animated:YES];
    details.hidesBottomBarWhenPushed = NO;
    
}
- (void)handleRead:(BaseButton *)button {
    NSUserDefaults *usersDefaults = [NSUserDefaults standardUserDefaults];
    self.dic = [usersDefaults objectForKey:@"info"];
    JYJVCOfFeaturedTopThreeDetails *details = (JYJVCOfFeaturedTopThreeDetails *)self.nextResponder.nextResponder.nextResponder;
    NSString *name = [usersDefaults objectForKey:@"userName"];
        if (name != nil) {
        NSString *str1 = @"json=%7B%22session%22%3A%7B%22uid%22%3A%22";
        NSString *strUid = self.dic[@"session"][@"uid"];
        NSString *str2 = @"%22%2C%22sid%22%3A%22";
        NSString *strSid = self.dic[@"session"][@"sid"];
        NSString *str3 = @"%22%7D%2C%22item_ids%22%3A%22";
        NSString *strItem_id =[NSString stringWithFormat:@"%@",self.infoDic[@"item_id"]] ;
        NSString *str4 = @"%22%2C%22operate%22%3A1%7D";
        str1 = [[[[[[str1 stringByAppendingString:strUid] stringByAppendingString:str2] stringByAppendingString:strSid] stringByAppendingString:str3] stringByAppendingString:strItem_id] stringByAppendingString:str4];
        [JYJNetWorkParser POST:@"http://www.aiyinsitanfm.com/mobile/channel/procwatch.jhtml" andBody:str1 andBodyStyle:JYJBodyString andHeader:HEADDIC andResponse:JYJJSON andSuccessBlock:^(id result) {
            NSString *str = result[@"proclist"];
            if (str.length != 0) {
                
                UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"订阅成功" preferredStyle:UIAlertControllerStyleAlert];
                [details presentViewController:alert animated:YES completion:nil];
                [alert dismissViewControllerAnimated:YES completion:nil];
                
            }
            else {
                UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"已经订阅" preferredStyle:UIAlertControllerStyleAlert];
                UIAlertAction *action = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
                    
                }];
                [alert addAction:action];
                [details presentViewController:alert animated:YES completion:nil];
                
            }

        } andFailureBlock:^(NSError *error) {
            
        }];
    }else {
        UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"请登录后选择订阅" preferredStyle:UIAlertControllerStyleAlert];
        UIAlertAction *action = [UIAlertAction actionWithTitle:@"确定" style: UIAlertActionStyleDefault  handler:^(UIAlertAction * _Nonnull action) {
            
        }];
        [alert addAction:action];
        [details presentViewController:alert animated:YES completion:nil];
    }

}
- (void)handle {
     JYJVCOfFeaturedTopThreeDetails *details  =(JYJVCOfFeaturedTopThreeDetails  *)self.nextResponder.nextResponder.nextResponder;
    JYJVCOfAnchorInfoViewController *anchor = [[JYJVCOfAnchorInfoViewController alloc]init];
    if (self.cycleImageModel) {
        anchor.dic = self.infoDic;
    }else if (self.itemsModel) {
       anchor.dic = self.infoDic;
    }else if (self.eventModel) {
        anchor.dic = self.infoDic;
    }else if (self.columnModel){
        anchor.dic = self.infoDic;
    }else if (self.columnListModel) {
        anchor.dic = self.infoDic;
    }else if (self.segmentModel) {
        anchor.dic = self.infoDic;
    }else if (self.segmentModelTwo){
        anchor.dic = self.infoDic;
    }else if (self.programListModel) {
        anchor.dic = self.infoDic;
    }else if (self.programListModelTwo) {
        anchor.dic = self.infoDic;
    }else if (self.musicsContentModel) {
        anchor.dic = self.infoDic;
    }else if (self.seachModelOne) {
        anchor.dic = self.infoDic;
    }else if (self.segmentModelTwo) {
        anchor.dic = self.infoDic;
    }else if (self.seachProgramModelOne) {
        anchor.dic = self.infoDic;
    }else {
       anchor.dic = self.infoDic;
    }

    details.tabBarController.tabBar.hidden = YES;
    details.hidesBottomBarWhenPushed = YES;
    [details.navigationController pushViewController:anchor animated:YES];
    details.hidesBottomBarWhenPushed = NO;
    
}



/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
